<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>配件签收</title>
    <link rel="stylesheet" href="../../../css/wx/mui.min.css">
    <link rel="stylesheet" href="../../../css/wx/app.css"/>
    <link rel="stylesheet" href="../../../css/wx/icons-extra.css"/>
    <link rel="stylesheet" href="../../../css/wx/style.css"/>
    <link rel="stylesheet" href="../../../css/wx/wx-iconfont.css"/>

    <script type="text/javascript">
        var pageConfig = {
            jss: ["app/pjqs/pjqs"],
            cb: function(o) {

                // 不影响初始页面的js, 可以延迟引入
                require(['wx-iconfont'], $.noop);

                app.requireCss(['css/wx/icons-extra'], doc);

                //把main.js返回的对象存在 p_main key下，可以通过app.pageModule('p_main')获取对象
                app.pageModule('p_pjqs', o);

            }
        };
    </script>
    <script data-main="../../../js/wx/public/config" src="../../../js/require.js"></script>

    <style>

        .mui-control-content {
            min-height: -webkit-fill-available;
        }

        .mui-control-content .mui-loading {
            margin-top: 50px;
        }

        .mui-bar-nav ~ .mui-content .mui-pull-top-pocket {
            top: 0px;
        }

        .mui-table-view-cell:after {
            height: 0;
        }

        .mui-card {
            margin-bottom: 0;
        }

        .mui-scroll-wrapper .mui-card-header .mui-checkbox.mui-left label {
            padding-left: 22px;
            font-size: 13px;
        }

        .mui-scroll-wrapper .mui-table-view-cell .mui-card {
            margin: 10px 10px 0 10px;
        }

        .mui-scroll-wrapper .mui-table-view-cell .mui-row .mui-col-xs-9 {
            padding-left: 15px;
            position: relative;
        }

        .footBtn .mui-checkbox {
            background: #fff;
            line-height: 50px;
        }

        .footBtn .mui-checkbox input {
            top: 12px;
        }

        .mui-scroll-wrapper .mui-table-view-cell .mui-row .mui-col-xs-9 .number {
            bottom: 0;
        }

        .mui-card-content .mui-card-content-inner p {
            line-height: 27px;
        }
        .mui-scroll-wrapper {
            bottom: 46px;
        }
        .mui-scroll-wrapper .number {
            bottom: 0;
        }
        #scroll2.mui-scroll-wrapper .mui-card-header .mui-checkbox.mui-left label {
            padding-left: 0;
        }
    </style>
</head>

<body>
<div class="mui-content mui-fullscreen">
    <!--<div class="mui-input-row searchBox">-->
    <!--<i class="mui-icon mui-icon-search"></i>-->
    <!--<input type="search" class="mui-input-clear" placeholder="">-->
    <!--</div>-->

    <!--已签收与未签收tap-->
    <div id="slider" class="mui-slider responseSlider wf-slider-bottom-nonSearch">
        <div id="sliderSegmentedControl"
             class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted shadow">
            <a class="mui-control-item" href="#item1mobile">
                未签收
            </a>
            <a class="mui-control-item" href="#item2mobile">
                已签收
            </a>
        </div>
        <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>
        <div class="mui-slider-group">
            <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
                <div id="scroll1" class="mui-scroll-wrapper">
                    <div class="mui-scroll">
                        <bjqs-item :model="items"></bjqs-item>
                    </div>
                </div>
            </div>
            <div id="item2mobile" class="mui-slider-item mui-control-content">
                <div id="scroll2" class="mui-scroll-wrapper">
                    <div class="mui-scroll">
                        <bjqs-item :model="items"></bjqs-item>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="footBtn flexl shadow2" id="footdiv">
        <div class="mui-checkbox mui-left" style="flex: 1;">
            <label>全选</label> <input type="checkbox" id="allCheck" style="top:17px;"></div>
        <button type="button" class="puliColor_bg edit" style="width: 50%;" @tap.stop="open">确定</button>
    </div>
</div>

<template id="item-template">
    <ul class="mui-table-view">
        <li class="mui-table-view-cell" v-for="(val,index) in model">
            <div class="mui-card">
                <div class="mui-card-header">
                    <div class="mui-checkbox mui-left" style="flex: 1 1 0%;">
                        <label>物料编号:{{val.MMRT003}}</label>
                        <input v-if="val.STATUS==1" type="checkbox" v-model="val.checked" style="left: -5px;top:0;"></div>
                </div>
                <div @tap.stop="showDetail(val)" class="mui-card-content">
                    <div class="mui-card-content-inner">
                        <div class="mui-row">
                            <div class="mui-col-xs-2">
                                <div class="goodsImg"><img :src="val.GWAM015 | goodsImgsUtils"/></div>
                            </div>
                            <div class="mui-col-xs-10">
                                <p><span>物料名称：</span>{{val.GWAML003}}</p>
                                <p v-if="val.STATUS==1"><span>申请数量：</span>{{val.MMRU}}</p>
                                <p v-if="val.STATUS==2"><span>申请数量：</span>{{val.MMRU005}}</p>
                                <p><span>批号：</span>{{val.MMRU004}}</p>
                                <p v-if="val.STATUS==2"><span>签收数量：</span>{{val.MMRV005}}</p>
                                <div v-if="val.STATUS==1" class="number">
                                    <div class="mui-numbox" id="numbox_demo2">
                                        <button @tap.stop="minus(val)" class="mui-btn mui-btn-numbox-minus" type="button">-</button>
                                        <input class="mui-input-numbox" type="number" v-model="val.MMRV005">
                                        <button @tap.stop="plus(val)" class="mui-btn mui-btn-numbox-plus" type="button">+</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </li>
    </ul>
</template>
</body>
</html>